mirror of
https://github.com/chatopera/cosin.git
synced 2025-07-11 20:17:03 +08:00
解决netty端口重启被占用问题
This commit is contained in:
parent
0a2c517b2d
commit
f60de23b5e
@ -66,6 +66,11 @@ public class MessagingServerConfigure {
|
||||
@Bean
|
||||
public SocketIOServer socketIOServer() throws NoSuchAlgorithmException, IOException {
|
||||
Configuration config = new Configuration();
|
||||
//解决对此重启服务时,netty端口被占用问题
|
||||
com.corundumstudio.socketio.SocketConfig tmpConfig = new com.corundumstudio.socketio.SocketConfig();
|
||||
tmpConfig.setReuseAddress(true);
|
||||
config.setSocketConfig(tmpConfig);
|
||||
|
||||
// config.setHostname("localhost");
|
||||
config.setPort(port);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user