As my understanding goes, ur connection goes to a hung state when u go out of coverage area. that could be because u might be using some thing like
while(connection.read()){
doSomeThing..
}
or a variant of this.
If this is the case what u could do is run a timer for the timeout period which sets the variable timeOut = true. And then you could use some thing like this
int readBytes = 0;
while(timeOut != true){
while((readBytes = connection.available()) > 0 ){
connection.read(data, currIndex, readBytes);
}
}
best of lucks