From 618314985d6a632ccfd2001d969d32a5ee6e4ca1 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 11 Mar 2012 20:45:43 +0200 Subject: Proper handling of failing to bind server socket --- src/connection.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/connection.cpp') diff --git a/src/connection.cpp b/src/connection.cpp index 60c99dc73..58a0fb2bd 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -986,8 +986,16 @@ nextpeer: void Connection::serve(u16 port) { dout_con< &data) if(m_bc_peerhandler) m_bc_peerhandler->deletingPeer(&tmp, e.timeout); continue; } + case CONNEVENT_BIND_FAILED: + throw ConnectionBindFailed("Failed to bind socket " + "(port already in use?)"); } } throw NoIncomingDataException("No incoming data"); -- cgit v1.2.3