Due to a problem with bind() an exception was thrown.
The text was:
"Could not bind: Transport endpoint is not connected"
which doesn't make sense.
It turned out that errno had been overwritten.
The correct text would have been:
"Could not bind: Address already in use"