comparison src/alice/daemon/IncomingTcpConnection.java @ 270:23e53aaa8720

reconnect manager worked.
author sugi
date Wed, 21 Aug 2013 15:33:49 +0900
parents 88be2824a989
children 7188fe3f7c95
comparison
equal deleted inserted replaced
269:9982e1c4f099 270:23e53aaa8720
11 import alice.datasegment.CommandType; 11 import alice.datasegment.CommandType;
12 import alice.datasegment.DataSegment; 12 import alice.datasegment.DataSegment;
13 import alice.datasegment.DataSegmentKey; 13 import alice.datasegment.DataSegmentKey;
14 import alice.datasegment.DataSegmentManager; 14 import alice.datasegment.DataSegmentManager;
15 import alice.datasegment.LocalDataSegmentManager; 15 import alice.datasegment.LocalDataSegmentManager;
16 import alice.topology.HostMessage;
17 import alice.topology.manager.reconnection.SendError;
16 18
17 public class IncomingTcpConnection extends Thread { 19 public class IncomingTcpConnection extends Thread {
18 20
19 public Connection connection; 21 public Connection connection;
20 public DataSegmentManager manager; 22 public DataSegmentManager manager;
67 } 69 }
68 } catch (ClosedChannelException e) { 70 } catch (ClosedChannelException e) {
69 connection.sendCommand(new Command(CommandType.CLOSE, null, null, null, 0, 0, null, null, null)); 71 connection.sendCommand(new Command(CommandType.CLOSE, null, null, null, 0, 0, null, null, null));
70 return; 72 return;
71 } catch (EOFException e) { 73 } catch (EOFException e) {
74 new SendError(new HostMessage(connection.socket.getInetAddress().getHostName(), connection.socket.getPort())).execute();
72 connection.sendCommand(new Command(CommandType.CLOSE, null, null, null, 0, 0, null, null, null)); 75 connection.sendCommand(new Command(CommandType.CLOSE, null, null, null, 0, 0, null, null, null));
73 return; 76 return;
74 } catch (IOException e) { 77 } catch (IOException e) {
75 e.printStackTrace(); 78 e.printStackTrace();
76 } 79 }